package com.zz.tijian.handle.ratelimiter.res;

import com.alibaba.fastjson.JSON;

import java.lang.reflect.Method;

public class CustomRateLimiterResponseStrategy implements RateLimiterResponseStrategy {
    @Override
    public Object getResponse(Method method) {
        RateLimiterResponse response = new RateLimiterResponse("400", "自定义限流返回信息");
        return JSON.parseObject(JSON.toJSONString(response), method.getReturnType());
    }
}
